#pragma once

class PlaceDongyiNewTool : public DgnPlatform::DgnPrimitiveTool, public PBBim::PBUIToWorkMessageEvent
{
    DEFINE_T_SUPER(DgnPlatform::DgnPrimitiveTool)
private:

    DgnProjectPtr project;
    IndexedViewportP m_viewport;
    PBModelInfoPtr m_modelInfoPtr;

    T_Point3dArray m_points;

    int                                        m_profileType;
    PBBimCoreModel::PBStandardSectionProfile   m_stdProfile;

    ArchModel::PBArchOpening                   m_Opening;
    ArchModel::PBArchWall                      m_Wall;
    ArchModel::PBArchSlab               m_Slab;

    double m_depth;
    bool isWall;

    DgnPlatform::ElementAgenda                  m_selectedElements;

protected:
    virtual Utf8CP _GetToolId() const override { return PBBIM_PLACE_ARCHOPENNING_PT; }
    virtual void _OnPostInstall() override;
    virtual void _OnRestartTool() override;
    virtual bool _OnDataButton(DgnButtonEventCP ev) override;
    virtual bool _OnResetButton(DgnButtonEventCP ev) override;
    virtual void _OnDynamicFrame(DgnButtonEventCP ev) override;
    virtual void _OnReceive(Utf8CP messageType, JsonValueCR messageDataObj) override;
    virtual bool _OnModelMotion(DgnButtonEventCP ev) override;

public:
    PlaceDongyiNewTool();
    ~PlaceDongyiNewTool();
    void SetStdProfile(PBBimCoreModel::PBStandardSectionProfile profile);
};
